package cn.tedu.spring.eg3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.swing.plaf.synth.SynthOptionPaneUI;

@Component
public class ShopController {
    private String mean;

    public ShopController(){
        System.out.println("1.无参构造实例化");
    }
    @Value("你干嘛")
    public void setMean(String mean) {
        this.mean = mean;
        System.out.println("2.set方法赋值!");
    }
    @PostConstruct
    public void init(){
        System.out.println("3.初始化成功");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("5.销毁成功!");
    }
}
